//
// Created by 21577 on 2025/3/4.
//
#include<stdio.h>

int main() {
    int T;
    scanf("%d",&T);
    int arr[T];
    for (int i = 0; i < T; i++) {
        scanf("%d",&arr[i]);
    }
    for(int j=0;j<T;j++) {
        int n = arr[j];

        double sum = 0, temp;
        double a = 2, b = 1;
        for (int k = 0; k < n; k++) {
            sum += a / b;
            temp = a;
            a = a + b;
            b = temp;
        }
        printf("%.2lf\n", sum);
    }
    return 0;
}